﻿using System;
using System.ServiceModel;
using NerdDinnerMVC.NerdDinnerService;

namespace NerdDinnerMVC.NerdDinnerService  
{
    public partial class DinnerServiceClient : IDisposable
    {
        void IDisposable.Dispose()
        {
            bool success = false;
            try
            {
                if (State != CommunicationState.Faulted)
                {
                    Close();
                    success = true;
                }
            }
            finally
            {
                if (!success)
                {
                    Abort();
                }
            }
        }


    }
}